home *** CD-ROM | disk | FTP | other *** search
- ' FILTDMO.ASC -- MSDOS QuickBASIC demo FILTER.SUB subroutines 25 June 86
- ' by David L. Poskie (608) 274-9560
- ' 7118 Raymond Rd. Madison, WI 53719
- ' Please run any suggestions, corrections, additions, or changes by me.
- ' I can be messaged on all the major Madison, WI RBBS's.
-
- GOTO Start
- Rem $Include: 'FILTER.SUB'
- Rem $Include: 'OMNI.SUB'
-
- Start:
- COLOR 14 , 3 , 8
- CLS
-
- ' Print centered Text$, with top of frame at line 2.
- X = 2 'Set the starting line
- FG = 11 'Set the color of Text$
- BG = 0 'Set the background color
- MG = 3 'Set the color of sign frame
- K.CODE = 8 'Set ASCII code of sign frame
- Text$ = "Demonstration of the FILTER.SUB subroutines"
- GOSUB SignCenter
- PRINT
-
- ' Use the front filter to eliminate "**"
- COLOR 11
- Text$ = "> Front Filtering <"
- GOSUB CenterPoint
- COLOR 14
-
- ' Text$ is the target string
- Text$ = "**FRONT FilterCheck"
-
- ' Show it before filtering
- GOSUB CenterPoint
-
- ' We'll remove what's in Check$
- Check$="**"
- GOSUB FilterCheck
-
- ' Show result
- GOSUB CenterPoint
-
- ' Use the tail filter to eliminate "##"
- COLOR 11
- Text$ = "> Tail Filtering <"
- GOSUB CenterPoint
- COLOR 14
- Text$ = "FilterCheckTail##"
- GOSUB CenterPoint
- Check$= "##"
- GOSUB FilterCheckTail
- GOSUB CenterPoint
-
- ' Use the space/TAB filter to eliminate leading spaces and TABS
- COLOR 11
- Text$ = "> TAB Filtering <"
- GOSUB CenterPoint
- COLOR 14
- ' Text$ contains two leading TABS
- Text$ = " 2 LEADING TABS"
- GOSUB CenterPoint
- GOSUB FilterSpaceTab
- GOSUB CenterPoint
-
- COLOR 11
- Text$ = "> Mixed Space & TAB Filtering <"
- GOSUB CenterPoint
- COLOR 14
- ' Text$ contains a mix of leading TABS and spaces
- Text$ = " MIXED SPACES & TABS"
- GOSUB CenterPoint
- GOSUB FilterSpaceTab
- GOSUB CenterPoint
-
- ' Going to filter the front non-alphabetic characters
- COLOR 11
- Text$ = "> Front Non-alphabetic Filtering <"
- GOSUB CenterPoint
- COLOR 14
- Text$ = "12345FILTER NUMBER 12345"
- GOSUB CenterPoint
- GOSUB FilterNonAlpha
- GOSUB CenterPoint
-
- ' Going to filter the front alphabetic characters (any non-numeric)
- COLOR 11
- Text$ = "> Front Non-numeric Filtering <"
- GOSUB CenterPoint
- COLOR 14
- Text$ = "ALPHA12345FILTER ALPHA"
- GOSUB CenterPoint
- GOSUB FilterNonNumeric
- GOSUB CenterPoint
- SYSTEM